package com.wsd.serviceImpl;

import com.wsd.dao.LoanInformationMapper;
import com.wsd.domain.LoanInfo;
import com.wsd.service.LoanListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname LoanListServiceImpl
 * @Description TODO
 * @Date 2020/7/23 10:07
 * @Created by niuxiaojuan
 */
@Service
public class LoanListServiceImpl implements LoanListService {
    @Autowired
    LoanInformationMapper loanInformationMapper;

    @Override
    public List<LoanInfo> findEndLoanList(int pagenum,int num) {

        return loanInformationMapper.findEndLoanList((pagenum-1)*num,num);
    }

    @Override
    public List<LoanInfo> findIngLoanList(int pagenum,int num) {
        return loanInformationMapper.findIngLoanList((pagenum-1)*num,num);
    }

    @Override
    public Long countEndLoanList() {
        return loanInformationMapper.countEndLoanList();
    }

    @Override
    public Long countIngLoanList() {
        return loanInformationMapper.countIngLoanList();
    }
}
